namespace StudentVideo.Common.Constants;

public static class RedisKeys {

   /// <summary>
   /// 组装 redis key
   /// </summary>
   /// <param name="rediskey">RedisKeys</param>
   /// <param name="extend"></param>
   /// <returns></returns>
   public static string AssembleKey(string rediskey, string extend) {
      return $"{rediskey}:{extend}";
   }

   /// <summary>
   /// 角色                      <br />
   /// type: Hash                <br />
   /// hashKey: {RoleId}         <br />
   /// hashValue: {RoleEntity}
   /// </summary>
   public const string Role = "Role";

   /// <summary>
   /// 用户 - 角色 映射       <br />
   /// type:      Hash        <br />
   /// hashKey:   {UserId}    <br />
   /// hashValue: {RoleId[]}
   /// </summary>
   public const string UserRoleMap = "UserRoleMap";

   /// <summary>
   /// 角色 - 权限 映射
   /// </summary>
   public const string RolePermissionMap = "UserPermissionMap";

   /// <summary>
   /// 权限列表
   /// </summary>
   public const string Permission = "Permission";

}
